#pragma once

template<class K>
class BSTree {
	typedef BSTNode<K> Node;
public:
	bool Insert(const K& key) {
		if (_root == nullptr) {
			_root = new node(key);
			return true;
		}
		Node* parent = nullptr;
		Node* cur = _root;
		while (cur) {
			if (cur->_key < key) {
				parent = cur;
				cur = cur->_right;
			}
			else if (cur->_key>key){
				parent = cur;
				cur = cur->_left;
			}
			else {
				return false;

			}
		}
		cur = new Node(key);
		if (parent->_key < key) {
			parent->_left
		}
	}
private:
	Node* _root;
};